package org.example.demo.monitor.ctrl;

import io.micrometer.core.instrument.Counter;
import io.micrometer.core.instrument.Metrics;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestCtrl {

    @GetMapping(value = "/testReq")
    public String testReq(){
        String[] allTags = new String[]{"Atest", "Atest2"};
        Counter counter = Metrics.counter("alanTest", allTags);
        counter.increment();
        return "testReq";
    }

    @GetMapping(value = "/testReq2")
    public String testReq2(){
        return "testReq2";
    }

}
